<?php

/**
 * Site form base class.
 *
 * @package    alika
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseSiteForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                      => new sfWidgetFormInputHidden(),
      'name'                    => new sfWidgetFormInput(),
      'proj_path'               => new sfWidgetFormInput(),
      'main_domain'             => new sfWidgetFormInput(),
      'ftp_host'                => new sfWidgetFormInput(),
      'ftp_dir'                 => new sfWidgetFormInput(),
      'ftp_user'                => new sfWidgetFormInput(),
      'ftp_password'            => new sfWidgetFormInput(),
      'photo_path'              => new sfWidgetFormInput(),
      'main_page_text'          => new sfWidgetFormTextarea(),
      'service_page_text'       => new sfWidgetFormTextarea(),
      'created_at'              => new sfWidgetFormDateTime(),
      'updated_at'              => new sfWidgetFormDateTime(),
      'domain'                  => new sfWidgetFormInput(),
      'url'                     => new sfWidgetFormInput(),
      'slogan'                  => new sfWidgetFormInput(),
      'email_contact'           => new sfWidgetFormInput(),
      'text_contact'            => new sfWidgetFormTextarea(),
      'text_after_send_contact' => new sfWidgetFormTextarea(),
      'menu_mainpage'           => new sfWidgetFormInput(),
      'menu_service'            => new sfWidgetFormInput(),
      'menu_articles'           => new sfWidgetFormInput(),
      'menu_contact'            => new sfWidgetFormInput(),
      'seo_title'               => new sfWidgetFormInput(),
      'seo_description'         => new sfWidgetFormTextarea(),
      'seo_keywords'            => new sfWidgetFormTextarea(),
      'seo_code_counter'        => new sfWidgetFormTextarea(),
      'fl_new'                  => new sfWidgetFormInputCheckbox(),
      'slogan1'                 => new sfWidgetFormTextarea(),
      'slogan2'                 => new sfWidgetFormTextarea(),
      'description'             => new sfWidgetFormTextarea(),
      'destrib'                 => new sfWidgetFormInput(),
      'folder_id'               => new sfWidgetFormPropelChoice(array('model' => 'Folder', 'add_empty' => false)),
      'items_per_page'          => new sfWidgetFormInput(),
      'mail_hostname'           => new sfWidgetFormInput(),
      'mail_port'               => new sfWidgetFormInput(),
      'mail_username'           => new sfWidgetFormInput(),
      'mail_password'           => new sfWidgetFormInput(),
      'mail_sender_address'     => new sfWidgetFormInput(),
      'mail_sender_name'        => new sfWidgetFormInput(),
      'mail_title'              => new sfWidgetFormInput(),
      'distrib_id'              => new sfWidgetFormPropelChoice(array('model' => 'Distrib', 'add_empty' => false)),
      'cache_time'              => new sfWidgetFormInput(),
      'owner_id'                => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => false)),
    ));

    $this->setValidators(array(
      'id'                      => new sfValidatorPropelChoice(array('model' => 'Site', 'column' => 'id', 'required' => false)),
      'name'                    => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'proj_path'               => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'main_domain'             => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'ftp_host'                => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'ftp_dir'                 => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'ftp_user'                => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'ftp_password'            => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'photo_path'              => new sfValidatorString(array('max_length' => 250)),
      'main_page_text'          => new sfValidatorString(),
      'service_page_text'       => new sfValidatorString(array('required' => false)),
      'created_at'              => new sfValidatorDateTime(array('required' => false)),
      'updated_at'              => new sfValidatorDateTime(array('required' => false)),
      'domain'                  => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'url'                     => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'slogan'                  => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'email_contact'           => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'text_contact'            => new sfValidatorString(array('required' => false)),
      'text_after_send_contact' => new sfValidatorString(array('required' => false)),
      'menu_mainpage'           => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'menu_service'            => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'menu_articles'           => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'menu_contact'            => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'seo_title'               => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'seo_description'         => new sfValidatorString(array('required' => false)),
      'seo_keywords'            => new sfValidatorString(array('required' => false)),
      'seo_code_counter'        => new sfValidatorString(array('required' => false)),
      'fl_new'                  => new sfValidatorBoolean(),
      'slogan1'                 => new sfValidatorString(array('required' => false)),
      'slogan2'                 => new sfValidatorString(array('required' => false)),
      'description'             => new sfValidatorString(array('required' => false)),
      'destrib'                 => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'folder_id'               => new sfValidatorPropelChoice(array('model' => 'Folder', 'column' => 'id')),
      'items_per_page'          => new sfValidatorInteger(array('required' => false)),
      'mail_hostname'           => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'mail_port'               => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'mail_username'           => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'mail_password'           => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'mail_sender_address'     => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'mail_sender_name'        => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'mail_title'              => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'distrib_id'              => new sfValidatorPropelChoice(array('model' => 'Distrib', 'column' => 'id')),
      'cache_time'              => new sfValidatorInteger(array('required' => false)),
      'owner_id'                => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id')),
    ));

    $this->widgetSchema->setNameFormat('site[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Site';
  }


}
